﻿
function doSearch()
{      
	   var con_item_9 = document.getElementById("item_9").value;
       //var con_province = document.getElementById("province").options[document.getElementById("province").selectedIndex].value;
       //var con_province_c = document.getElementById("province").options[document.getElementById("province").selectedIndex].text;
       //var con_NewEnergyClass = document.getElementById("NewEnergyClass").options[document.getElementById("NewEnergyClass").selectedIndex].value;
      // var con_NewEnergyClass_c = document.getElementById("NewEnergyClass").options[document.getElementById("NewEnergyClass").selectedIndex].text;

	  //&& con_province   == "" && con_NewEnergyClass == ""
       if (con_item_9 == "")
      {
        alert("请选择检索词，谢谢！");
        return;
       }
     
      var v_condition = " 1=1 ";      
   
      //标题
    if  (con_item_9 != "")
    {
    
    
    	v_condition = v_condition + " and (Item_9 like '%" + con_item_9 + "%'";
        
        v_condition = v_condition + " or Item_37 like '%" + con_item_9 + "%'";
        
        v_condition = v_condition + " or UnitIntro like '%" + con_item_9 + "%')";
        
     	if (document.getElementById("topicname").value == "") {
             document.getElementById("topicname").value = con_item_9;
        }else {
             document.getElementById("topicname").value = document.getElementById("topicname").value + "+" +con_item_9;
        }     
        
    }
     
     
     /*
    if (con_province  != "") {
		v_condition = v_condition + " and Item_64 ='" + con_province + "'";
		if (document.getElementById("topicname").value == "") {
                        document.getElementById("topicname").value = con_province_c;
                }
                else {
                        document.getElementById("topicname").value = document.getElementById("topicname").value + "+" +con_province_c;
                }     
              
    }*/
    
    
    /*
    if (con_NewEnergyClass  != "") {
		v_condition = v_condition + " and (NewEnergyClass1 ='" + con_NewEnergyClass + "' or NewEnergyClass2='" + con_NewEnergyClass +"')";
              	if (document.getElementById("topicname").value == "") {
                        document.getElementById("topicname").value = con_NewEnergyClass_c;
                }
                else {
                        document.getElementById("topicname").value = document.getElementById("topicname").value + "+" +con_NewEnergyClass_c;
                }     
    
    }*/
                                         
       document.getElementById("key").value=v_condition;
      
       document.forms["searchform"].submit(); 
   
}




function changeOption(v_value,v_text,v_option)
{   
    document.getElementById(v_option).options[document.getElementById(v_option).selectedIndex].value=v_value;
    document.getElementById(v_option).options[document.getElementById(v_option).selectedIndex].text=v_text; 
    
}




